home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group99a.txt
/
000086_icon-group-sender _Mon Apr 5 13:21:17 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id NAA02050
for icon-group-addresses; Mon, 5 Apr 1999 13:21:09 -0700 (MST)
Message-Id: <199904052021.NAA02050@baskerville.CS.Arizona.EDU>
X-Authentication-Warning: pluto.mscc.huji.ac.il: mslamm owned process doing -bs
Date: Mon, 5 Apr 1999 20:08:26 +0300 (WET)
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
To: Todd Proebsting <toddpro@microsoft.com>
cc: icon-group@optima.CS.Arizona.EDU
Subject: RE: How programs fail
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
On Mon, 5 Apr 1999, Todd Proebsting wrote:
> I like Icon's model of what is failure and what is an error, although I,
> too, have been nailed by a failing expression that in a particular context
> is fatal to my application. To find such, I use the following pattern:
>
> f := open(filename) | runerr(500, filename)
>
> runerr(500) is for "Programmer-Specified Errors" and reports "program
> malfunction", which is precisely what you want in this circumstance.
> Getting the stack trace is useful.
>
The actuall code looked like this:
o := if fn == "-" then &output else
open(fn||"l","w") | stop("Can't open output file \"",fn||"l,"\"")
Also, as I said I ran it with a trace, which didn't show anything
relevant.
I too am fond of "failure as a programming sitation." In this case it is
like excpetions in other language, but of course the goal directed nature
of Icon makes it much more powerful.
Ehud Lamm mslamm@pluto.mscc.huji.ac.il
http://www2.cybercities.com/e/ehud <== E-List, Ada, SE and more.